home *** CD-ROM | disk | FTP | other *** search
- Path: erich.triumf.ca!bennett
- From: bennett@erich.triumf.ca (P.Bennett)
- Newsgroups: comp.lang.c
- Subject: Re: FLOATING POINT PROBLEM
- Date: 1 Apr 1996 08:07 PST
- Organization: TRIUMF: Tri-University Meson Facility
- Distribution: world
- Message-ID: <1APR199608073462@erich.triumf.ca>
- References: <4joeof$hoc@newsbf02.news.aol.com>
- NNTP-Posting-Host: ftp.triumf.ca
- News-Software: VAX/VMS VNEWS 1.50
-
- In article <4joeof$hoc@newsbf02.news.aol.com>, maddawson@aol.com (MADDawson) writes...
- >I have been working on a Windows program. The prog compiles correctly
- >without any warnings or errors. When I add something that tries to get a
- >float value from a string, the program quits running. It does this in and
- >out of the IDE.
- >
-
- While you did give a good description of the problem, and the steps you took to
- try to correct it, you omitted two very important details that would help
- others suggest solutions: the particular compiler you are using, and the error
- messages you get.
-
- This is a fairly common problem with Borland compilers, and usually results in
- an error message like "scanf: floating point formats not linked"
-
- In an effort to save a couple of K of code size, Borland compilers omit support
- for floating point operations if the linker doesn't see any float operations -
- just reading a float with scanf() is apparently not sufficient to make the
- linker include the float support.
-
- This is probably covered in the readme files that come with the compiler - it
- is for my TC4.5Win.
-
- The recommended cure is something like:
- Add the following lines to one source file:
- extern _floatconvert
- #pragma extref _floatconvert
- (strictly from memory....)
-
- Or just add some real float operation.
-
- Peter Bennett VE7CEI | Vessels shall be deemed to be in sight
- Internet: bennett@triumf.ca | of one another only when one can be
- Packet: ve7cei@ve7kit.#vanc.bc.ca | observed visually from the other
- TRIUMF, Vancouver, B.C., Canada | ColRegs 3(k)
- GPS and NMEA info and programs: ftp://sundae.triumf.ca/pub/peter/index.html
- or: ftp://ftp-i2.informatik.rwth-aachen.de/pub/arnd/GPS/peter/index.html
-
-